home *** CD-ROM | disk | FTP | other *** search
/ Pascal Super Library / Pascal Super Library (CW International)(1997).bin / PGM_TOOL / SMP_PT / CURSOR.PAS < prev    next >
Pascal/Delphi Source File  |  1995-04-02  |  888b  |  41 lines

  1. {comments:
  2.  
  3.           Try experimenting with the cursor editor (or on your own), I
  4.           only listed the very basic cursor commands (all the ones I use).
  5.  
  6. }
  7.  
  8. uses crt, dos;
  9.  
  10. procedure InvokeCursor(startscan, stopscan: integer);
  11.  
  12. Const
  13.   VideoIO     = $10;
  14.   CursorShape =   1;
  15. Var
  16.   Regs : Registers;
  17. begin
  18.   With Regs do
  19.     begin
  20.       CH:=StartScan;
  21.       CL:=StopScan;
  22.       AH:=CursorShape;
  23.       Intr(VideoIO,Regs);
  24.     end;
  25. end;
  26.  
  27. begin
  28.    clrscr;
  29.    writeln;
  30.    invokecursor(6,7);
  31.    write('[Normal Cursor] Press a key: '); readkey; writeln;
  32.    invokecursor(0,7);
  33.    write('[Block Cursor] Press a key: '); readkey; writeln;
  34.    invokecursor(3,7);
  35.    write('[Half Cursor] Press a key: '); readkey; writeln;
  36.    invokecursor(32,0);
  37.    write('[Cursor Bye-Bye] Press a key: '); readkey; writeln;
  38.  
  39.    invokecursor(6,7); {return to normal}
  40.  
  41. end.